package com.qf.Dao;

import com.qf.entity.SysUser;
import com.qf.entity.UserManagEmentPaginationDisplay;

import java.sql.SQLException;
import java.util.List;

/**
 * 用户管理界面
 */
public interface UserDao {
    //查询总记录数
    Integer selectCount() throws SQLException;

    //查询当前页的数据
    List<UserManagEmentPaginationDisplay> selectByUser(Integer currentPageNo, Integer pageSize) throws SQLException;

    List<SysUser> idByUser(int id) throws SQLException;

    /**
     * 添加
     *
     * @param user
     * @return
     * @throws SQLException
     */
    int addUser(SysUser user) throws SQLException;

    int modify(SysUser user) throws SQLException;

    int delUser(int id) throws SQLException;

    /**
     * 重置密码
     *
     * @param id
     * @return
     * @throws SQLException
     */
    String resetPassword(int id) throws SQLException;

    int freeze(int id) throws SQLException;

    int unfreeze(int id) throws SQLException;

    /**
     * 角色分配
     */
    int roleAssignment(int id, int roleid) throws SQLException;

    /**
     * 根据条件 查询
     */
    List<UserManagEmentPaginationDisplay> ConditionalQuery(String str, String startTime, String endTime, Integer currentPageNo, Integer pageSize) throws SQLException;

}
